PROJECT = Rutas
SRC = menu.cpp
OBJ = Rutas.o
DEP = $(SRC) $(OBJ)

#LEDAROOT = /opt/leda

all: $(PROJECT)

#$(PROJECT): $(SRC)

clean:
	rm $(PROJECT) $(OBJ)

LEDA.DIR     = $(LEDAROOT)
LEDA.LIB.DIR = $(LEDA.DIR)
LEDA.INC.DIR = $(LEDA.DIR)/incl
LEDA.LIBS    = -lW -lP -lG -lL -lX11

C++          = g++
C++.FLAGS    = -g -Wall -Wno-deprecated
C++.DIRS     = -I$(LEDA.INC.DIR) -L$(LEDA.LIB.DIR)
C++.LIBS     = $(LEDA.LIBS)

SYS = $(shell uname)

ifeq ($(SYS), Linux)
 C++.DIRS += -L/usr/X11R6/lib
 ifeq ($(MACHTYPE), x86_64)
   C++.DIRS += -L/usr/X11R6/lib64
 endif
endif

C++.LIBS += -lm

$(OBJ): %.o: %.cpp %.h
	$(C++) $(C++.FLAGS) $(C++.DIRS) -c $< -o $@

$(PROJECT): $(DEP)
	$(C++) $(C++.FLAGS) $(C++.DIRS) $(DEP) -o $@ $(C++.LIBS)
